<template>
	<view class="flex-page-wrapper">
		<uni-nav-bar statusBar backgroundColor="#784DFF" color="#fff" title="用户服务协议"></uni-nav-bar>

		<view class="flex-page">
			<view class="special zc-content-html" v-html="html"></view>
		</view>
	</view>
</template>

<script>
	import protal from '@/api/protal.js'

	export default {
		data() {
			return {
				html: "",
				name: ''
			}
		},
		onLoad(options) {
			this.getGz(options.name)
		},
		methods: {
			getGz(t) {
				console.log(t)
				// register_rule注册规则
				// privacy_rule 隐私政策
				this.name = t
				protal.zcGzDetail(t || 'register_rule').then((res) => {
					if (res.data) {
						this.html = this.En ? res.data.contentEn : res.data.content;
					}
				});
			},
		},
	}
</script>

<style lang="scss" scoped>
	.flex-page {
		overflow: auto;
		margin-top: -1px;
		background-color: #fff;

		.special {
			padding: 20px;
		}
	}
</style>